Adaptive image sharpening method

ABSTRACT

The invention discloses an adaptive image sharpening method for generating a sharpened image area corresponding to an original image area. The original image area includes a plurality of original pixel values. The method includes blurring the original image area to generate a plurality of blurred pixel values corresponding to the plurality of original pixel values respectively, calculating a plurality of characteristic values corresponding to the plurality of original pixel values respectively, statistically analyzing the plurality of characteristic values to generate a plurality of weighting values corresponding to the plurality of original pixel values respectively, and generating a plurality of sharpened pixel values according to the plurality of original pixel values, the plurality of blurred pixel values, and the plurality of weighting values. The plurality of sharpened pixel values constitutes the sharpened image area.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to image sharpening, and more particularly, to an image sharpening method that utilizes dynamically determined weighting values during an image sharpening process.

2. Description of the Prior Art

Un Sharp Mask (USM) is a technology that allows images to be sharpened. The technology first utilizes a mask, such as a Gaussian mask, to generate a blurred image corresponding to an original image. The blurred image is then subtracted from the original image to obtain a detailed image corresponding to the original image. Finally, the original image is combined with a product of the detailed image and a fixed weighting value to obtain a sharpened image corresponding to the original image. The following equation illustrates the concept of USM.

P _(SHARP) =P _(ORIGINAL)+α(P _(ORIGINAL) −P _(BLUR)),

where α is the fixed weighting value, P_(ORIGINAL) is an original pixel value of the original image, P_(BLUR) is a blurred pixel value of the blurred image and corresponds to the original pixel value, (P_(ORIGINAL)−P_(BLUR)) represents a detailed pixel value in the detailed image and corresponds to the original pixel value P_(ORIGINAL), and P_(SHARP) is a sharpened pixel value of the sharpened image and corresponds to the original pixel value P_(ORIGINAL).

In the related art, a single weighting value α is utilized to sharpen all the pixels of an original image. If the weighting value α is too small, the sharpened image will be too similar to the original image so that the sharpening result is non-ideal. On the other hand, if the weighting value α is too large, some areas of the sharpened image will be distorted and become too artificial for human perception.

SUMMARY OF THE INVENTION

The embodiment of the present invention discloses an adaptive image sharpening method for generating a sharpened image area corresponding to an original image area. The original image area includes a plurality of original pixel values. The method comprises: blurring the original image area to generate a plurality of blurred pixel values corresponding to the plurality of original pixel values respectively, calculating a plurality of characteristic values corresponding to the plurality of original pixel values respectively, statistically analyzing the plurality of characteristic values to accordingly generate a plurality of weighting values corresponding to the plurality of original pixel values respectively, and generating a plurality of sharpened pixel values according to the plurality of original pixel values, the plurality of weighting values, and the plurality of blurred pixel values. The plurality of sharpened pixel values constitutes the sharpened image area.

These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an exemplary flowchart according to the adaptive image sharpening method of the present invention.

DETAILED DESCRIPTION

FIG. 1 shows an exemplary flowchart according to the adaptive image sharpening method of the present invention. The adaptive image sharpening method allows a sharpened image area corresponding to an original image area to be generated, where the original image area could be a sub-area of an original image and the sharpened image area could be a sub-area of a sharpened image. The sharpened image is a result generated through applying the adaptive image sharpening method to the whole original image. Specifically, the original image area comprises a plurality of original pixel values. For example, the original image area may comprise eight original pixel values P_(ORIGINAL) _(—) ₁, P_(ORIGINAL) _(—) ₂, . . . , P_(ORIGINAL) _(—) ₇, and P_(ORIGINAL) _(—) ₈ lying in eight locations (x, y), (x+1, y), . . . , (x+6, y), and (x+7, y) of the original image. The sharpened image area may comprise eight sharpened pixel values P_(SHARP) _(—) ₁, P_(SHARP) _(—) ₂, . . . , P_(SHARP) _(—) ₇, and P_(SHARP) _(—) ₈ lying in eight locations (x, y), (x+1, y), . . . , (x+6, y), and (x+7, y) of the sharpened image. The flowchart shown in FIG. 1 includes the following steps:

Step 110: Blur the original image area to generate a plurality of blurred pixel values P_(BLUR) _(—) ₁˜P_(BLUR) _(—) ₈ corresponding to the plurality of original pixel values P_(ORIGINAL) _(—) ₁˜P_(ORIGINAL) _(—) ₈ respectively. Every kind of image-blurring mask can be used in this step to blur the original image area. For example, for an integer lying between one and eight, P_(BLUR) _(—) _(X) can be generated through using a Gaussian mask to perform a convolution operation centered at P_(ORIGINAL) _(—) _(X). Since the Gaussian mask and other image-blurring masks are well known image-processing masks, further description of them will be omitted herein.

Step 120: Calculate a plurality of characteristic values CV₁˜CV₈ corresponding to the plurality of original pixel values P_(ORIGINAL) _(—) ₁˜P_(ORIGINAL) _(—) ₈ respectively. In this step, one or more masks selected from a group consisting of gradient masks, curvature masks, sharpen masks, and blur masks are used. For example, six masks, including a horizontal gradient mask, a vertical gradient mask, a horizontal curvature mask, a vertical curvature mask, a sharpen mask, and a blur mask can be used. For an original pixel value P_(ORIGINAL) _(—) _(X), the six masks are used to perform convolution operations centered at P_(ORIGINAL) _(—) _(X) to obtain six convolution values CV_(X) _(—) ₁˜CV_(X) _(—) ₆ corresponding to P_(ORIGINAL) _(—) _(X). The characteristic value CV_(X) is then determined based upon the six convolution values CV_(X) _(—) ₁˜CV_(X) _(—) ₆. For instance, the average of the six convolution values CV_(X) _(—) ₁˜CV_(X) _(—) ₆ can be used as the characteristic value CV_(X) corresponding to P_(ORIGINAL) _(—) _(X). In other words, CV_(X)=(CV_(X) _(—) ₁+CV_(X) _(—) ₂+CV_(X) _(—) ₃+CV_(X) _(—) ₄+CV_(X) _(—) ₅+CV_(X) _(—) ₆)/6. Since the gradient masks, curvature masks, sharpen masks, and blur masks are well known image processing masks, further description of them will be omitted herein.

Step 130: Statistically analyze the plurality of characteristic values CV₁˜CV₈ to accordingly generate a plurality of weighting values α₁˜α₈ corresponding to the plurality of original pixel values P_(ORIGINAL) _(—) ₁˜P_(ORIGINAL) _(—) ₈ respectively. This step may include the following sub-steps: (a) Calculate an average value AV and a standard deviation SD of the characteristic values CV₁˜CV₈. (b) Define a plurality of difference ranges based on the standard deviation SD. For example, in sub-step (b), 0˜0.5*SD, 0.5*SD˜1*SD, 1*SD˜1.5*SD, 1.5*SD˜2*SD, 2*SD˜2.5*SD, 2.5*SD˜3*SD, 3*SD˜3.5*SD, 3.5*SD˜4*SD, and higher than 4*SD can be defined as a first, a second, a third, a fourth, a fifth, a sixth, a seventh, an eight, and a ninth difference range, respectively. (c) For each original pixel value P_(ORIGINAL) _(—) _(X) of the plurality of original pixel values P_(ORIGINAL) _(—) ₁˜P_(ORIGINAL) _(—) ₈, calculate an absolute difference AD_(X) between the characteristic values CV_(X) and the average value AV. In other words, AD_(X)=abs(CV_(X)−AV). (d) Determine which of the plurality of difference ranges the absolute difference ADx lies in, and accordingly determine a weighting value α_(X) for the original pixel value P_(ORIGINAL) _(—) _(X). For example, when the absolute difference AD_(X) lies in an n^(th) difference range of the plurality of difference ranges, an n^(th) predetermined weighting values α_(PREDETERMINED) _(—) _(n) is utilized as the weighting values α_(X). The nine predetermined weighting values α_(PREDETERMINED) _(—) ₁˜α_(PREDETERMINED) _(—) ₈ can be determined according to experimental results or sharpening requests. In step 130, the weighting values α₁˜α₈ corresponding to the original pixel values P_(ORIGINAL) _(—) ₁˜P_(ORIGINAL) _(—) ₈ are allowed to be different from each other. This serves as one of the major differences between the method of the present invention and that of the related art.

Step 140: Generate a plurality of sharpened pixel values P_(SHARP) _(—) ₁˜P_(SHARP) _(—) ₈ according to the plurality of original pixel values P_(ORIGINAL) _(—) ₁˜P_(ORIGINAL) _(—) ₈, the plurality of weighting values α₁˜α₈, and the plurality of blurred pixel values P_(BLUR) _(—) ₁˜P_(BLUR) _(—) ₈. More specifically, each one of the plurality of sharpened pixel values P_(SHARP) _(—) ₁˜P_(SHARP) _(—) ₈ can be determined through the following equation:

P _(SHARP) _(—) _(X) =P _(ORIGINAL) _(—) _(X)+α_(X)(P _(ORIGINAL) _(—) _(X) −P _(BLUR) _(—) _(X)), X=1˜8

In the method shown in FIG. 1, different weighting values α are utilized to sharpen pixels with different characteristic values. In setting the predetermined weighting values α_(PREDETERMINED) _(—) ₁˜α_(PREDETERMINED) _(—) ₉, the following principals can be referenced: (a) larger weighting values can be assigned to pixels located on edges or smooth areas; and (b) smaller weighting values can be assigned to pixels located in areas having minor pixel value variation. Through an experiment, it can be confirmed that the method of the present invention provides a more natural sharpened image with lesser artifacts.

Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims. 

1. An adaptive image sharpening method, for generating a sharpened image area corresponding to an original image area, the original image area including a plurality of original pixel values, the method comprising: blurring the original image area to generate a plurality of blurred pixel values corresponding to the plurality of original pixel values respectively; calculating a plurality of characteristic values corresponding to the plurality of original pixel values respectively; statistically analyzing the plurality of characteristic values to generate a plurality of weighting values corresponding to the plurality of original pixel values respectively; and generating a plurality of sharpened pixel values according to the plurality of original pixel values, the plurality of weighting values, and the plurality of blurred pixel values; wherein the plurality of sharpened pixel values constitute the sharpened image area.
 2. The adaptive image sharpening method of claim 1, wherein the step of blurring the original image area to generate a plurality of blurred pixel values corresponding to the plurality of original pixel values respectively comprises: utilizing a Gaussian mask to blur the original image area to generate the plurality of blurred pixel values corresponding to the plurality of original pixel values respectively.
 3. The adaptive image sharpening method of claim 1, wherein the step of calculating a plurality of characteristic values corresponding to the plurality of original pixel values respectively comprises: for each one of the plurality of original pixel values, utilizing a plurality of masks to perform convolution operations centered on the original pixel value to generate a plurality of convolution values; and calculating a characteristic value corresponding to the original pixel value according to the plurality of convolution values.
 4. The adaptive image sharpening method of claim 3, wherein the step of calculating a characteristic value corresponding to the original pixel value according to the plurality of convolution values comprises: calculating an average value of the plurality of convolution values and utilizing the calculated average value as the characteristic value corresponding to the original pixel value.
 5. The adaptive image sharpening method of claim 3, wherein the plurality of masks is selected from a group consisting of gradient masks, curvature masks, sharpen masks, and blur masks.
 6. The adaptive image sharpening method of claim 3, wherein the plurality of masks comprises a horizontal gradient mask, a vertical gradient mask, a horizontal curvature mask, a vertical curvature mask, a sharpen mask, and a blur mask.
 7. The adaptive image sharpening method of claim 1, wherein the step of statistically analyzing the plurality of characteristic values to accordingly generate a plurality of weighting values corresponding to the plurality of original pixel values respectively comprises: calculating an average value and a standard deviation of the plurality of characteristic values; defining a plurality of difference ranges according to the standard deviation; and for each one of the plurality of original pixel values, determining which of the plurality of difference ranges an absolute difference between the average value and a characteristic value of the original pixel value lies in, and accordingly determining a weighting value corresponding to the original pixel value.
 8. The adaptive image sharpening method of claim 7, wherein the step of determining which of the plurality of difference ranges an absolute difference between the average value and a characteristic value of the original pixel value lies in, and accordingly determining a weighting value corresponding to the original pixel value comprises: utilizing a first predetermined weighting value as the weighting value corresponding to the original pixel value when the absolute difference lies in a first difference range of the plurality of difference ranges; and utilizing a second predetermined weighting value as the weighting value corresponding to the original pixel value when the absolute difference lies in a second difference range of the plurality of difference ranges; wherein the first predetermined weighting value is different from the second predetermined weighting value.
 9. The adaptive image sharpening method of claim 1, wherein the step of generating a plurality of sharpened pixel values according to the plurality of original pixel values, the plurality of weighting values, and the plurality of blurred pixel values comprises: for each one of the plurality of original pixel values, subtracting a blurred pixel value corresponding to the original pixel value from the original pixel value to generated a detailed image value; multiplying the detailed image value by a weighting value corresponding to the original pixel value; and adding the original pixel value and a product of the detailed pixel value and the weighting value to generate a sharpened pixel value corresponding to the original pixel value. 